package helper.scxml.scxml2.t0.case4_

import helper.base.debug.DebugHelper.DebuggerList
import helper.base.debug.DebugHelper.DebuggerList.Companion.makeDebuggerList
import helper.base.debug.DebugRes
import helper.base.debug.DebugRes.d_getInitialZoneState
import helper.base.debug.DebugRes.d_plnInitialG
import helper.scxml.scxml2.zone.t2.T3SNodeUnitHelper.T3SNodeUnit
import helper.scxml.scxml2.zone.t2.ZoneEnvTestHelper.test_randomRun
import helper.scxml.scxml2.zone.t2.case3_factoryLines.FLEnvHelper
import helper.scxml.scxml2.zone.t2.case4_.T4EnvHelper.StrategyObj.ER.makeT1T4Strategy
import helper.scxml.scxml2.zone.t2.case4_.T4EnvHelper.T4Env.Companion.makeT4Env
import org.junit.Test

internal class T4EnvHelperTest {
    @Test
    fun test_printlnHIF() {
        val t4Env = makeT4Env(1)
        t4Env.run {
            printlnHIF()
        }
    }

    @Test
    fun test_getInitialConfig() {
        val t4Env = makeT4Env(1)
        val debuggerList = makeDebuggerList(
            d_getInitialZoneState,
            d_plnInitialG,
        )
        t4Env.getInitialConfig(
            debuggerList,
        )
    }

    private fun test_t4ZoneEnv_randomRun(
        strategy: T3SNodeUnit,
        debuggerList: DebuggerList = makeDebuggerList(),
    ) {
        val env = makeT4Env()
        test_randomRun(env, strategy, debuggerList)
    }

    @Test
    fun t1_test_t4ZoneEnv_randomRun() {
        test_t4ZoneEnv_randomRun(
            makeT1T4Strategy(),
            debuggerList = makeDebuggerList(),
        )
    }
}